package com.fiberhome.excel.reader.controller;


import java.io.IOException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.fiberhome.excel.reader.service.ReaderService;

@Controller
public class ExcelController {
	@Autowired
	private ReaderService readerService;
	@RequestMapping("/")
	public Integer read() {
		try {
			readerService.readExcel("H:\\Desktop\\need_cat2.xls");
		} catch (IOException e) {
			e.printStackTrace();
			return 0;
		}
		return 1;
	}
	
}
